<template>
  <div class="index_container">
    <ul>
      <li v-for="(item, index) in liList" :key="index" @click="Link(index + 1)">
        {{ index + 1 }}、{{ item.name }}
      </li>
    </ul>
  </div>
</template>
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()

const liList = ref([
  {
    name: 'echarts_1'
  },
  {
    name: 'echarts_2'
  },
  {
    name: 'echarts_3'
  },
  {
    name: 'echarts_4'
  },
  {
    name: 'echarts_5'
  },
  {
    name: 'echarts_6'
  }
])

const Link = (path) => {
  path = 'echarts_' + path
  router.push(path) // 跳转
}
</script>
<style lang="less" scoped>
.index_container {
  li {
    list-style: none;
    cursor: pointer;
  }
}
</style>
